package org.jsola.contract.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Length;
import org.jsola.contract.constant.EnterpriseSealType;
import org.jsola.contract.constant.FontType;
import org.jsola.contract.constant.PersonSealType;
import org.jsola.contract.constant.SealColor;
import org.jsola.core.dto.BaseDTO;
import org.jsola.core.validator.Const;

import javax.validation.constraints.NotNull;

import static org.jsola.contract.example.SealExample.E_ACCOUNT_ID;
import static org.jsola.contract.example.SealExample.E_BOTTOM_TEXT;
import static org.jsola.contract.example.SealExample.E_COLOR;
import static org.jsola.contract.example.SealExample.E_CONTENT;
import static org.jsola.contract.example.SealExample.E_DESCRIPTION;
import static org.jsola.contract.example.SealExample.E_ENTERPRISE_SEAL_TYPE;
import static org.jsola.contract.example.SealExample.E_FONT;
import static org.jsola.contract.example.SealExample.E_FONT_SIZE;
import static org.jsola.contract.example.SealExample.E_ISSUE;
import static org.jsola.contract.example.SealExample.E_IS_LEGAL_PERSON;
import static org.jsola.contract.example.SealExample.E_LEGAL_PERSON;
import static org.jsola.contract.example.SealExample.E_LEGAL_PERSON_PICTURE;
import static org.jsola.contract.example.SealExample.E_NAME;
import static org.jsola.contract.example.SealExample.E_PERSONAL_SEAL_TYPE;
import static org.jsola.contract.example.SealExample.E_ROUND_TEXT;
import static org.jsola.contract.example.SealExample.E_ROW_TEXT;
import static org.jsola.contract.example.SealExample.E_SEAL_STRING;
import static org.jsola.contract.example.SealExample.E_SOURCE_ID;
import static org.jsola.contract.example.SealExample.E_STATUS;
import static org.jsola.contract.example.SealExample.E_SUBJECT_ID;
import static org.jsola.contract.example.SealExample.E_TEXT;
import static org.jsola.contract.example.SealExample.M_ACCOUNT_ID_MAX;
import static org.jsola.contract.example.SealExample.M_BOTTOM_TEXT_MAX;
import static org.jsola.contract.example.SealExample.M_COLOR_ENUM_NOT_MATCH;
import static org.jsola.contract.example.SealExample.M_COLOR_MAX;
import static org.jsola.contract.example.SealExample.M_CONTENT_MAX;
import static org.jsola.contract.example.SealExample.M_DESCRIPTION_MAX;
import static org.jsola.contract.example.SealExample.M_ENTERPRISE_SEAL_TYPE_ENUM_NOT_MATCH;
import static org.jsola.contract.example.SealExample.M_ENTERPRISE_SEAL_TYPE_MAX;
import static org.jsola.contract.example.SealExample.M_FONT_ENUM_NOT_MATCH;
import static org.jsola.contract.example.SealExample.M_FONT_MAX;
import static org.jsola.contract.example.SealExample.M_FONT_SIZE_MAX;
import static org.jsola.contract.example.SealExample.M_LEGAL_PERSON_MAX;
import static org.jsola.contract.example.SealExample.M_LEGAL_PERSON_PICTURE_MAX;
import static org.jsola.contract.example.SealExample.M_NAME_MAX;
import static org.jsola.contract.example.SealExample.M_NAME_NOT_NULL;
import static org.jsola.contract.example.SealExample.M_PERSONAL_SEAL_TYPE_ENUM_NOT_MATCH;
import static org.jsola.contract.example.SealExample.M_PERSONAL_SEAL_TYPE_MAX;
import static org.jsola.contract.example.SealExample.M_ROUND_TEXT_MAX;
import static org.jsola.contract.example.SealExample.M_ROW_TEXT_MAX;
import static org.jsola.contract.example.SealExample.M_SEAL_STRING_MAX;
import static org.jsola.contract.example.SealExample.M_SOURCE_ID_MAX;
import static org.jsola.contract.example.SealExample.M_SUBJECT_ID_MAX;
import static org.jsola.contract.example.SealExample.M_TEXT_MAX;
import static org.jsola.contract.example.SealExample.N_ACCOUNT_ID;
import static org.jsola.contract.example.SealExample.N_BOTTOM_TEXT;
import static org.jsola.contract.example.SealExample.N_COLOR;
import static org.jsola.contract.example.SealExample.N_CONTENT;
import static org.jsola.contract.example.SealExample.N_DESCRIPTION;
import static org.jsola.contract.example.SealExample.N_ENTERPRISE_SEAL_TYPE;
import static org.jsola.contract.example.SealExample.N_FONT;
import static org.jsola.contract.example.SealExample.N_FONT_SIZE;
import static org.jsola.contract.example.SealExample.N_ISSUE;
import static org.jsola.contract.example.SealExample.N_IS_LEGAL_PERSON;
import static org.jsola.contract.example.SealExample.N_LEGAL_PERSON;
import static org.jsola.contract.example.SealExample.N_LEGAL_PERSON_PICTURE;
import static org.jsola.contract.example.SealExample.N_NAME;
import static org.jsola.contract.example.SealExample.N_PERSONAL_SEAL_TYPE;
import static org.jsola.contract.example.SealExample.N_ROUND_TEXT;
import static org.jsola.contract.example.SealExample.N_ROW_TEXT;
import static org.jsola.contract.example.SealExample.N_SEAL_STRING;
import static org.jsola.contract.example.SealExample.N_SOURCE_ID;
import static org.jsola.contract.example.SealExample.N_STATUS;
import static org.jsola.contract.example.SealExample.N_SUBJECT_ID;
import static org.jsola.contract.example.SealExample.N_TEXT;

/**
 * 印章
 *
 * @author JanusMix
 */
@EqualsAndHashCode(callSuper = true)
@ApiModel(description = "新增【印章】的参数")
@Data
public class SealAddDTO extends BaseDTO {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(notes = N_SUBJECT_ID, example = E_SUBJECT_ID)
    @Length(max = 32, message = M_SUBJECT_ID_MAX)
    private String subjectId;

    @ApiModelProperty(notes = N_NAME, example = E_NAME, required = true)
    @NotNull(message = M_NAME_NOT_NULL)
    @Length(max = 255, message = M_NAME_MAX)
    private String name;
    /**
     * 企业实名认证表id，hr_company_organization
     */
    private Long organizationId;
    /**
     * 君子签印章id
     */
    private String thirdSealId;

    @ApiModelProperty(notes = N_SOURCE_ID, example = E_SOURCE_ID)
    @Length(max = 32, message = M_SOURCE_ID_MAX)
    private String sourceId;

    @ApiModelProperty(notes = N_DESCRIPTION, example = E_DESCRIPTION)
    @Length(max = 1000, message = M_DESCRIPTION_MAX)
    private String description;

    @ApiModelProperty(notes = N_ACCOUNT_ID, example = E_ACCOUNT_ID)
    @Length(max = 40, message = M_ACCOUNT_ID_MAX)
    private String accountId;

    @ApiModelProperty(notes = N_IS_LEGAL_PERSON, example = E_IS_LEGAL_PERSON)
    private Boolean isLegalPerson;

    @ApiModelProperty(notes = N_LEGAL_PERSON, example = E_LEGAL_PERSON)
    @Length(max = 50, message = M_LEGAL_PERSON_MAX)
    private String legalPerson;

    @ApiModelProperty(notes = N_LEGAL_PERSON_PICTURE, example = E_LEGAL_PERSON_PICTURE)
    @Length(max = 2147483647, message = M_LEGAL_PERSON_PICTURE_MAX)
    private String legalPersonPicture;

    @ApiModelProperty(notes = N_SEAL_STRING, example = E_SEAL_STRING)
    @Length(max = 2147483647, message = M_SEAL_STRING_MAX)
    private String sealString;

    @ApiModelProperty(notes = N_CONTENT, example = E_CONTENT)
    @Length(max = 255, message = M_CONTENT_MAX)
    private String content;

    @ApiModelProperty(notes = N_COLOR, example = E_COLOR, allowableValues = SealColor.VALUES_STR)
    @Length(max = 30, message = M_COLOR_MAX)
    @Const(constClass = SealColor.class, message = M_COLOR_ENUM_NOT_MATCH)
    private String color;

    @ApiModelProperty(notes = N_FONT, example = E_FONT, allowableValues = FontType.VALUES_STR)
    @Length(max = 50, message = M_FONT_MAX)
    @Const(constClass = FontType.class, message = M_FONT_ENUM_NOT_MATCH)
    private String font;

    @ApiModelProperty(notes = N_FONT_SIZE, example = E_FONT_SIZE)
    @Length(max = 30, message = M_FONT_SIZE_MAX)
    private String fontSize;

    @ApiModelProperty(notes = N_PERSONAL_SEAL_TYPE, example = E_PERSONAL_SEAL_TYPE, allowableValues = PersonSealType.VALUES_STR)
    @Length(max = 100, message = M_PERSONAL_SEAL_TYPE_MAX)
    @Const(constClass = PersonSealType.class, message = M_PERSONAL_SEAL_TYPE_ENUM_NOT_MATCH)
    private String personalSealType;

    @ApiModelProperty(notes = N_ENTERPRISE_SEAL_TYPE, example = E_ENTERPRISE_SEAL_TYPE, allowableValues = EnterpriseSealType.VALUES_STR)
    @Length(max = 100, message = M_ENTERPRISE_SEAL_TYPE_MAX)
    @Const(constClass = EnterpriseSealType.class, message = M_ENTERPRISE_SEAL_TYPE_ENUM_NOT_MATCH)
    private String enterpriseSealType;

    @ApiModelProperty(notes = N_TEXT, example = E_TEXT)
    @Length(max = 255, message = M_TEXT_MAX)
    private String text;

    @ApiModelProperty(notes = N_ROUND_TEXT, example = E_ROUND_TEXT)
    @Length(max = 255, message = M_ROUND_TEXT_MAX)
    private String roundText;

    @ApiModelProperty(notes = N_ROW_TEXT, example = E_ROW_TEXT)
    @Length(max = 255, message = M_ROW_TEXT_MAX)
    private String rowText;

    @ApiModelProperty(notes = N_BOTTOM_TEXT, example = E_BOTTOM_TEXT)
    @Length(max = 255, message = M_BOTTOM_TEXT_MAX)
    private String bottomText;

    @ApiModelProperty(notes = N_ISSUE, example = E_ISSUE)
    private Boolean issue;

    @ApiModelProperty(notes = N_STATUS, example = E_STATUS)
    private Integer status;


}

